Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for Nano ID #2364

Merged
merged 3 commits into from
Apr 9, 2024
Merged

Conversation

ivoilic
Copy link
Contributor

@ivoilic ivoilic commented Apr 24, 2023

This adds support for Nano ID, a unique string/id standard. Nano ID is great because it's url friendly, a fixed length, and significantly shorter than UUIDs.

Note: The Nano ID package does allow for a custom character dictionary and id length, however the regex in this PR only matches the default Nano ID specification.

@netlify
Copy link

netlify bot commented Apr 24, 2023

Deploy Preview for guileless-rolypoly-866f8a ready!

Name Link
🔨 Latest commit f75a9c4
🔍 Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/6614b55d2b868300080605fc
😎 Deploy Preview https://deploy-preview-2364--guileless-rolypoly-866f8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ivoilic ivoilic changed the title Adds support for Nano Id Adds support for Nano ID Apr 24, 2023
@stale
Copy link

stale bot commented Jul 23, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No activity in last 60 days label Jul 23, 2023
@stale stale bot removed the stale No activity in last 60 days label Aug 14, 2023
@ivoilic
Copy link
Contributor Author

ivoilic commented Aug 14, 2023

Hey @colinhacks,
Sorry to bother you but would you mind reviewing this PR? It adds support for a widely adopted ID standard and is full implemented with tests and everything. Totally understand if you don't believe support for nanoid is worth including in zod but either way it would be nice to close the PR, merged or not. Thank you for your time and hard work on this library!

@djdembeck
Copy link

Would love to see this merged. Considering NanoId has now even surpassed CUID in NPM usage.

@colinhacks colinhacks merged commit 69eee9c into colinhacks:master Apr 9, 2024
19 of 20 checks passed
@colinhacks colinhacks mentioned this pull request Apr 21, 2024
@colinhacks
Copy link
Owner

This has landed in Zod 3.23.

https://github.com/colinhacks/zod/releases/tag/v3.23.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants